package com.ymatou.iapi.synctrade.parameter.mongo.details;

import java.io.Serializable;
import java.util.Date;

import org.springframework.data.mongodb.core.mapping.Field;

import com.ymttest.database.model.annotation.Column;
import com.ymttest.database.model.annotation.Table;

/**
 * 交易状态记录
 * Created by zhangyifan on 2016/12/8.
 */
@SuppressWarnings("serial")
public class StatusLog implements Serializable {
	/**
	 * stlog
	 * 状态
	 */
	@Table("Ymt_TradingStatus")
	@Column("iTradingStatus")
	@Field("logSt")
	private Integer logStatus;

	/**
	 * stlog
	 * 状态备注
	 */
	@Table("Ymt_TradingStatus")
	@Column("mMemo")
	@Field("memo")
	private String memo;

	/**
	 * stlog
	 * 状态记录时间
	 */
	@Table("Ymt_TradingStatus")
	@Column("dUpdateTime")
	@Field("logTm")
	private Date logTime;

	public Integer getLogStatus() {
		return logStatus;
	}

	public void setLogStatus(Integer logStatus) {
		this.logStatus = logStatus;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public Date getLogTime() {
		return logTime;
	}

	public void setLogTime(Date logTime) {
		this.logTime = logTime;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o)
			return true;
		if (!(o instanceof StatusLog))
			return false;

		StatusLog statusLog = (StatusLog) o;

		if (getLogStatus() != null ? !getLogStatus().equals(
				statusLog.getLogStatus()) : statusLog.getLogStatus() != null)
			return false;
		if (getMemo() != null
				? !getMemo().equals(statusLog.getMemo())
				: statusLog.getMemo() != null)
			return false;
		return getLogTime() != null ? getLogTime().equals(
				statusLog.getLogTime()) : statusLog.getLogTime() == null;

	}

	@Override
	public int hashCode() {
		int result = getLogStatus() != null ? getLogStatus().hashCode() : 0;
		result = 31 * result + (getMemo() != null ? getMemo().hashCode() : 0);
		result = 31 * result
				+ (getLogTime() != null ? getLogTime().hashCode() : 0);
		return result;
	}
}
